object Demo {
  // 模式匹配
  def main(args: Array[String]): Unit = {
    def matchTest (x:Any): Unit = {
      x match {
        case x:Int => println( "  type is int")
        case x:String => println("type is string")
        case 1.1 => println(" number is 1.1")
        case 2.2 => println(" number is 2.2")
        case _ => println(" no match")
      }
    }
    matchTest(3.3)


  }



}
